/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sreams;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

/**
 *
 * @author Educacionit
 */
public class Lector {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        // TODO code application logic here
        File archivo = new File("entrada.txt");
        FileReader  in = null;
        BufferedReader buff = null;
        try {
            in = new FileReader(archivo);
               buff = new BufferedReader(in);

            while (buff.ready()) {
                System.out.print((char)buff.read());
            }

        } catch(Exception e){
            e.printStackTrace();
        } finally {
            try{
                buff.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
            try {
                in.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

    }

}
